package letsjava.pattern.iterator;

public class Test {
	public static void main(String agrs[]) {
		Iterator it;
		Teacher teacher = new ConcreteTeacher();

		it = teacher.createIterator(); // 老师开始点名
		while (!it.isDone()) { // 如果没点完
			System.out.println(it.currentItem().toString()); // 获得被点到同学的情况
			it.next(); // 点下一个
		}

	}
}